﻿<%@ Page Language="C#" MasterPageFile="~/mychau_admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="SanPham.aspx.cs" Inherits="mychau_admin_common_SanPham" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <h3>
            Quản lý chuyên mục sản phẩm
        </h3>
    </div>
    <div>
        <div>
            <asp:Label ID="lblAddOrEdit" runat="server"></asp:Label>
        </div>
        <div>
            <asp:Panel ID="pnlAddProduct" runat="server">
                <table cellspacing="5px">
                    <tr>
                        <td>
                            <asp:Label ID="lblHSXAdd" runat="server" Text="Hãng sản xuất"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtHSXAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblXuatXuAdd" runat="server" Text="Xuất xứ"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtXuatXuAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblModelAdd" runat="server" Text="Model"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtModelAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblTinhTrangAdd" runat="server" Text="Tình Trạng"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTinhTrangAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblHopSoAdd" runat="server" Text="Hộp số"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtHopSoAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblChungLoaiXeAdd" runat="server" Text="Chủng loại xe"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtChungLoaiXeAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblNamAdd" runat="server" Text="Năm"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtNamAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblKichThuocAdd" runat="server" Text="Kích thước"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtKichThuocAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblChieuDaiAdd" runat="server" Text="Chiều dài"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtChieuDaiAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblTuTrongAdd" runat="server" Text="Tự trọng"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTuTrongAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblTongTrongLuongAdd" runat="server" Text="Tổng trọng lượng"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTongTrongLuongAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblXiLanhAdd" runat="server" Text="Xilanh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtXiLanhAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblCongSuatAdd" runat="server" Text="Công xuất"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCongSuatAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblMomenAdd" runat="server" Text="Momen"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtMomenAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblNhienLieuAdd" runat="server" Text="Nhiên liệu"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtNhienLieuAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblTieuHaoNLAdd" runat="server" Text="Tiêu hao nhiên liệu"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTieuHaoNLAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblDungTichNLAdd" runat="server" Text="Dung tích nhiên liệu"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtDungTichNLAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblSoCuaAdd" runat="server" Text="Số cửa"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtSoCuaAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblSoGheAdd" runat="server" Text="Số ghế"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtSoGheAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblCoLopTruocAdd" runat="server" Text="Cỡ lốp trước"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCoLopTruocAdd" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblCoLopSauAdd" runat="server" Text="Cỡ lốp sau"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCoLopSauAdd" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblimage1Add" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtimage1Add" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblimage2Add" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtimage2Add" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblimage3Add" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtimage3Add" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblimage4Add" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtimage4Add" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblimage5Add" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtimage5Add" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblTrangThietBiAdd" runat="server" Text="Trang thiết bị"></asp:Label>
                        </td>
                        <td colspan="3">
                            <CKEditor:CKEditorControl ID="ckeTrangThietBiAdd" runat="server"></CKEditor:CKEditorControl>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right">
                            <asp:Button ID="btnAddProduct" runat="server" Text="Thêm" OnClick="btnAddProduct_Click" />
                            <asp:Button ID="btnCancelAddProduct" runat="server" Text="Nhập lại" OnClick="btnCancelAddProduct_Click" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pnlEditProduct" runat="server">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lblHangSanXuatEdit" runat="server" Text="Hãng sản xuất"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtHangSanXuatEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblXuatXuEdit" runat="server" Text="Xuất xứ"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtXuatXuEdit" runat="server" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            <asp:Label ID="lblModelEdit" runat="server" Text="Model"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtModelEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblTingTrangEdit" runat="server" Text="Tình Trạng"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTinhTrangEdit" runat="server" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            <asp:Label ID="lblHopSoEdit" runat="server" Text="Hộp số"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtHopSoEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblChungLoaiXeEdit" runat="server" Text="Chủng loại xe"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtChungLoaiXeEdit" runat="server" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            <asp:Label ID="lblNamEdit" runat="server" Text="Năm"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtNamEdit" runat="server" />
                        </td>
                          <td>
                            <asp:Label ID="lblKichThuocEdit" runat="server" Text="Kích thước"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtKichThuocEdit" runat="server" />
                        </td>
                    </tr>
                   
                    <tr>
                        <td>
                            <asp:Label ID="lblChieuDaiEdit" runat="server" Text="Chiều dài"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtChieuDaiEdit" runat="server" />
                        </td>
                         <td>
                            <asp:Label ID="lblTuTrongEdit" runat="server" Text="Tự trọng"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTuTrongEdit" runat="server" />
                        </td>
                    </tr>
                   
                    <tr>
                        <td>
                            <asp:Label ID="lblTongTrongLuongEdit" runat="server" Text="Tổng trọng lượng"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTongTrongLuongEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblXilanhEdit" runat="server" Text="Xilanh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtXilanhEdit" runat="server" />
                        </td>
                    </tr>
                  
                    <tr>
                        <td>
                            <asp:Label ID="lblCongSuatEdit" runat="server" Text="Công xuất"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCongSuatEdit" runat="server" />
                        </td>
                         <td>
                            <asp:Label ID="lblMomenEdit" runat="server" Text="Momen"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtMomenEdit" runat="server" />
                        </td>
                    </tr>
                   
                    <tr>
                        <td>
                            <asp:Label ID="lblNhienLieuEdit" runat="server" Text="Nhiên liệu"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtNhienLieuEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblTieuHaoNLEdit" runat="server" Text="Tiêu hao nhiên liệu"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtTieuHaoNLEdit" runat="server" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            <asp:Label ID="lblDungTichNLEdit" runat="server" Text="Dung tích nhiên liệu"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtDungTichNLEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblSoCuaEdit" runat="server" Text="Số cửa"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtSoCuaEdit" runat="server" />
                        </td>
                    </tr>
                   
                    <tr>
                        <td>
                            <asp:Label ID="lblSoGheEdit" runat="server" Text="Số ghế"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtSoGheEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblCoLopTruocEdit" runat="server" Text="Cỡ lốp trước"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCoLopTruocEdit" runat="server" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            <asp:Label ID="lblCoLopSauEdit" runat="server" Text="Cỡ lốp sau"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCoLopSauEdit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblImage1Edit" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtImage1Edit" runat="server" />
                        </td>
                    </tr>
                  
                    <tr>
                        <td>
                            <asp:Label ID="lblImage2Edit" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtImage2Edit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblImage3Edit" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtImage3Edit" runat="server" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td>
                            <asp:Label ID="lblImage4Edit" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtImage4Edit" runat="server" />
                        </td>
                        <td>
                            <asp:Label ID="lblImage5Edit" runat="server" Text="Ảnh"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtImage5Edit" runat="server" />
                        </td>
                    </tr>                   
                    <tr>
                        <td>
                            <asp:Label ID="lblTrangThietBiEdit" runat="server" Text="Trang thiết bị"></asp:Label>
                        </td>
                        <td colspan="3">
                            <CKEditor:CKEditorControl ID="ckeTrangThietBiEdit" runat="server"></CKEditor:CKEditorControl>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right">
                            <asp:Button ID="btnEditProduct" runat="server" Text="Sửa" OnClick="btnEditProduct_Click" />
                            <asp:Button ID="btnCancelEditProduct" runat="server" Text="Hủy" OnClick="btnCancelEditProduct_Click" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </div>
        <p style="color: Red;">
            <asp:Label ID="lblError" runat="server"></asp:Label>
        </p>
        <div>
            <asp:DataList ID="dtlProduct" runat="server" DataKeyField="ID" OnDeleteCommand="dtlProduct_DeleteCommand"
                OnEditCommand="dtlProduct_EditCommand">
                <HeaderTemplate>
                    <table class="viewTable">
                        <tr>
                            <th>
                                Sửa
                            </th>
                            <th>
                                Xóa
                            </th>
                            <th>
                                Mã sản phẩm
                            </th>
                            <th>
                                Hãng sản xuất
                            </th>
                            <th>
                                Xuất xứ
                            </th>
                            <th>
                                Model
                            </th>
                            <th>
                                Tình trạng
                            </th>
                            <th>
                                Hộp số
                            </th>
                            <th>
                                Chủng loại xe
                            </th>
                            <th>
                                Năm
                            </th>
                            <th>
                                Kích thước
                            </th>
                            <th>
                                Chiều dài
                            </th>
                            <th>
                                Tự trọng
                            </th>
                            <th>
                                Tổng trọng lượng
                            </th>
                            <th>
                                Xilanh
                            </th>
                            <th>
                                Công Suất
                            </th>
                            <th>
                                Momen
                            </th>
                            <th>
                                Nhiên liệu
                            </th>
                            <th>
                                Tiêu hao nhiên liệu
                            </th>
                            <th>
                                Dung tích nhiên liệu
                            </th>
                            <th>
                                Số cửa
                            </th>
                            <th>
                                Số ghế
                            </th>
                            <th>
                                Cỡ lốp trước
                            </th>
                            <th>
                                Cớ lốp sau
                            </th>
                            <th>
                                Ảnh
                            </th>
                            <th>
                                Ảnh
                            </th>
                            <th>
                                Ảnh
                            </th>
                            <th>
                                Ảnh
                            </th>
                            <th>
                                Ảnh
                            </th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:LinkButton ID="lbtnEdit" runat="server" CommandName="Edit">
                                <asp:Image ID="imgEdit" runat="server" ImageUrl="~/images/Img_Admin/edit.gif" /></asp:LinkButton>
                        </td>
                        <td>
                            <asp:LinkButton ID="lbtnDelete" runat="server" CommandName="Delete" Style="position: relative"
                                OnClientClick="return confirm('Are you sure want delete this category?');">
                                <asp:Image ID="imgDelete" runat="server" ImageUrl="~/images/Img_Admin/delete.gif" /></asp:LinkButton>
                        </td>
                        <td>
                            <asp:Label ID="lblProductID" Text='<%#Eval("ID") %>' runat="server"></asp:Label>
                        </td>
                        <td>
                            <%#Eval("hangSanXuat")%>
                        </td>
                        <td>
                            <%#Eval("xuatXu") %>
                        </td>
                        <td>
                            <%#Eval("model") %>
                        </td>
                        <td>
                            <%#Eval("tinhTrang") %>
                        </td>
                        <td>
                            <%#Eval("hopSo") %>
                        </td>
                        <td>
                            <%#Eval("chungLoaiXe") %>
                        </td>
                        <td>
                            <%#Eval("nam") %>
                        </td>
                        <td>
                            <%#Eval("kichThuoc") %>
                        </td>
                        <td>
                            <%#Eval("chieuDai") %>
                        </td>
                        <td>
                            <%#Eval("tuTrong") %>
                        </td>
                        <td>
                            <%#Eval("tongTrongLuong") %>
                        </td>
                        <td>
                            <%#Eval("xilanh") %>
                        </td>
                        <td>
                            <%#Eval("congSuat") %>
                        </td>
                        <td>
                            <%#Eval("momen") %>
                        </td>
                        <td>
                            <%#Eval("nhienLieu") %>
                        </td>
                        <td>
                            <%#Eval("tieuHaoNL") %>
                        </td>
                        <td>
                            <%#Eval("dungTichNL") %>
                        </td>
                        <td>
                            <%#Eval("soCua") %>
                        </td>
                        <td>
                            <%#Eval("soGhe") %>
                        </td>
                        <td>
                            <%#Eval("coLopTruoc") %>
                        </td>
                        <td>
                            <%#Eval("coLopSau") %>
                        </td>
                        <td>
                            <%#Eval("image1") %>
                        </td>
                        <td>
                            <%#Eval("image2") %>
                        </td>
                        <td>
                            <%#Eval("image3") %>
                        </td>
                        <td>
                            <%#Eval("image4") %>
                        </td>
                        <td>
                            <%#Eval("image5") %>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:DataList>
        </div>
    </div>
</asp:Content>
